<?php
class TicketLogDao {
	public $table = 'ticket_log';
	public function add($data){
		$field = array('add_time','add_admin','ticket_id');
		ClassManager::getSql()->insertArray($this->table, $field, $data);
	}

	public function getByTicketId($ticketId){
		return ClassManager::getSql()->onedata($this->table,'*',"where ticket_id =".intval($ticketId));
	}
	
	public function getDataPairListByTicketIdList($strs_list){
		$strs = implode(',', $strs_list);
		return ClassManager::getSql()->dataPairList($this->table,'*'," where ticket_id in (".$strs.")");
	}
	
	public function updates($data , $id){
		ClassManager::getSql()->updates($this->table, $data,"where id in(".$id.")");
	}
	
	
	public function updatesByTicketIdList($data , $id){
		ClassManager::getSql()->updates($this->table, $data,"where ticket_id in(".$id.")");
	}
	
	public function updateByTicketId($data,$ticketId){
		ClassManager::getSql()->updates($this->table, $data,"where ticket_id =".intval($ticketId));
	}
}
?>